package com.cangshi.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


@Controller
public class TestController {


    @ResponseBody
    @RequestMapping(value = "/test", method = RequestMethod.GET ,produces = "text/html;charset=UTF-8")
    public String init(@RequestParam(required = false) String val){
//        JsonObject jsonObject = new JsonObject();
//        jsonObject.setError(0);
//        jsonObject.setMes("操作成功");
//        return JSON.toJSONString(jsonObject);
        return "你好你看见我了??？\n"+"我觉得："+val;
    }
    @ResponseBody
    @RequestMapping(value = "/test1",method=RequestMethod.GET,produces = "text/html;charset=UTF-8")
    public String get(){
        return "好好学习！";
    }
}
